﻿using dnAnalytics.Math;
using NUnit.Framework;

namespace dnAnalytics.Tests.Math
{
    [TestFixture]
    public class Complex32Math_Minus32Test
    {
        [Test]
        public void Minus()
        {
            Complex32 a = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            Complex32 b = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, 1.19209289550780998537e-7f);
            b = new Complex32(0.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(0.0f, -1.19209289550780998537e-7f);
            b = new Complex32(0.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, -5.00000119209289550781e-1f), 1e-7f);
            a = new Complex32(0.0f, 5.0e-1f);
            b = new Complex32(0.0f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(0.0f, - 5.0e-1f);
            b = new Complex32(0.0f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, -1.5f), 1e-7f);
            a = new Complex32(0.0f, 1.0f);
            b = new Complex32(0.0f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(0.0f, -1.0f);
            b = new Complex32(0.0f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, -3.0f), 1e-7f);
            a = new Complex32(0.0f, 2.0f);
            b = new Complex32(0.0f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(0.0f, -2.0f);
            b = new Complex32(0.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, -8.38861e6f), 1e-7f);
            a = new Complex32(0.0f, 8.388608e6f);
            b = new Complex32(0.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(0.0f, -8.388608e6f);
            b = new Complex32(1.19209289550780998537e-7f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.19209289550780998537e-7f, -8.388608e6f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 0.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.38418579101561997074e-7f, 0.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 0.0f);
            b = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.38418579101561997074e-7f, -1.19209289550780998537e-7f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            b = new Complex32(1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            b = new Complex32(-1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.38418579101561997074e-7f, -2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            b = new Complex32(-1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            b = new Complex32(1.19209289550780998537e-7f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.38418579101561997074e-7f, -5.00000119209289550781e-1f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 5.0e-1f);
            b = new Complex32(1.19209289550780998537e-7f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, - 5.0e-1f);
            b = new Complex32(-1.19209289550780998537e-7f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.38418579101561997074e-7f, -1.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 5.0e-1f);
            b = new Complex32(-1.19209289550780998537e-7f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, - 5.0e-1f);
            b = new Complex32(1.19209289550780998537e-7f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.38418579101561997074e-7f, -1.5f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 1.0f);
            b = new Complex32(1.19209289550780998537e-7f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -1.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.38418579101561997074e-7f, -2.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 1.0f);
            b = new Complex32(-1.19209289550780998537e-7f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -1.0f);
            b = new Complex32(1.19209289550780998537e-7f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.38418579101561997074e-7f, -3.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 2.0f);
            b = new Complex32(1.19209289550780998537e-7f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -2.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.38418579101561997074e-7f, -4.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 2.0f);
            b = new Complex32(-1.19209289550780998537e-7f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -2.0f);
            b = new Complex32(1.19209289550780998537e-7f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.38418579101561997074e-7f, -8.38861e6f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 8.388608e6f);
            b = new Complex32(1.19209289550780998537e-7f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -8.388608e6f);
            b = new Complex32(-1.19209289550780998537e-7f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.38418579101561997074e-7f, -1.6777216e7f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 8.388608e6f);
            b = new Complex32(-1.19209289550780998537e-7f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -8.388608e6f);
            b = new Complex32(5.0e-1f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-5.00000119209289550781e-1f, -8.388608e6f), 1e-7f);
            a = new Complex32(5.0e-1f, 0.0f);
            b = new Complex32(-5.0e-1f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.0f, 0.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, 0.0f);
            b = new Complex32(5.0e-1f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.0f, -1.19209289550780998537e-7f), 1e-7f);
            a = new Complex32(5.0e-1f, 1.19209289550780998537e-7f);
            b = new Complex32(5.0e-1f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(5.0e-1f, -1.19209289550780998537e-7f);
            b = new Complex32(-5.0e-1f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.0f, -2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-5.0e-1f, 1.19209289550780998537e-7f);
            b = new Complex32(-5.0e-1f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-5.0e-1f, -1.19209289550780998537e-7f);
            b = new Complex32(5.0e-1f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.0f, -5.00000119209289550781e-1f), 1e-7f);
            a = new Complex32(5.0e-1f, 5.0e-1f);
            b = new Complex32(5.0e-1f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(5.0e-1f, - 5.0e-1f);
            b = new Complex32(-5.0e-1f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.0f, -1.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, 5.0e-1f);
            b = new Complex32(-5.0e-1f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, - 5.0e-1f);
            b = new Complex32(5.0e-1f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.0f, -1.5f), 1e-7f);
            a = new Complex32(5.0e-1f, 1.0f);
            b = new Complex32(5.0e-1f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(5.0e-1f, -1.0f);
            b = new Complex32(-5.0e-1f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.0f, -2.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, 1.0f);
            b = new Complex32(-5.0e-1f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, -1.0f);
            b = new Complex32(5.0e-1f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.0f, -3.0f), 1e-7f);
            a = new Complex32(5.0e-1f, 2.0f);
            b = new Complex32(5.0e-1f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(5.0e-1f, -2.0f);
            b = new Complex32(-5.0e-1f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.0f, -4.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, 2.0f);
            b = new Complex32(-5.0e-1f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, -2.0f);
            b = new Complex32(5.0e-1f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.0f, -8.38861e6f), 1e-7f);
            a = new Complex32(5.0e-1f, 8.388608e6f);
            b = new Complex32(5.0e-1f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(5.0e-1f, -8.388608e6f);
            b = new Complex32(-5.0e-1f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.0f, -1.6777216e7f), 1e-7f);
            a = new Complex32(-5.0e-1f, 8.388608e6f);
            b = new Complex32(-5.0e-1f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(-5.0e-1f, -8.388608e6f);
            b = new Complex32(1.0f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.5f, -8.388608e6f), 1e-7f);
            a = new Complex32(1.0f, 0.0f);
            b = new Complex32(-1.0f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.0f, 0.0f), 1e-7f);
            a = new Complex32(-1.0f, 0.0f);
            b = new Complex32(1.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.0f, -1.19209289550780998537e-7f), 1e-7f);
            a = new Complex32(1.0f, 1.19209289550780998537e-7f);
            b = new Complex32(1.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(1.0f, -1.19209289550780998537e-7f);
            b = new Complex32(-1.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.0f, -2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-1.0f, 1.19209289550780998537e-7f);
            b = new Complex32(-1.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-1.0f, -1.19209289550780998537e-7f);
            b = new Complex32(1.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.0f, -5.00000119209289550781e-1f), 1e-7f);
            a = new Complex32(1.0f, 5.0e-1f);
            b = new Complex32(1.0f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(1.0f, - 5.0e-1f);
            b = new Complex32(-1.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.0f, -1.0f), 1e-7f);
            a = new Complex32(-1.0f, 5.0e-1f);
            b = new Complex32(-1.0f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(-1.0f, - 5.0e-1f);
            b = new Complex32(1.0f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.0f, -1.5f), 1e-7f);
            a = new Complex32(1.0f, 1.0f);
            b = new Complex32(1.0f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(1.0f, -1.0f);
            b = new Complex32(-1.0f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.0f, -2.0f), 1e-7f);
            a = new Complex32(-1.0f, 1.0f);
            b = new Complex32(-1.0f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(-1.0f, -1.0f);
            b = new Complex32(1.0f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.0f, -3.0f), 1e-7f);
            a = new Complex32(1.0f, 2.0f);
            b = new Complex32(1.0f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(1.0f, -2.0f);
            b = new Complex32(-1.0f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.0f, -4.0f), 1e-7f);
            a = new Complex32(-1.0f, 2.0f);
            b = new Complex32(-1.0f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(-1.0f, -2.0f);
            b = new Complex32(1.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(-2.0f, -8.38861e6f), 1e-7f);
            a = new Complex32(1.0f, 8.388608e6f);
            b = new Complex32(1.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(1.0f, -8.388608e6f);
            b = new Complex32(-1.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(2.0f, -1.6777216e7f), 1e-7f);
            a = new Complex32(-1.0f, 8.388608e6f);
            b = new Complex32(-1.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(-1.0f, -8.388608e6f);
            b = new Complex32(2.0f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-3.0f, -8.388608e6f), 1e-7f);
            a = new Complex32(2.0f, 0.0f);
            b = new Complex32(-2.0f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(4.0f, 0.0f), 1e-7f);
            a = new Complex32(-2.0f, 0.0f);
            b = new Complex32(2.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(-4.0f, -1.19209289550780998537e-7f), 1e-7f);
            a = new Complex32(2.0f, 1.19209289550780998537e-7f);
            b = new Complex32(2.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(2.0f, -1.19209289550780998537e-7f);
            b = new Complex32(-2.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(4.0f, -2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-2.0f, 1.19209289550780998537e-7f);
            b = new Complex32(-2.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-2.0f, -1.19209289550780998537e-7f);
            b = new Complex32(2.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(-4.0f, -5.00000119209289550781e-1f), 1e-7f);
            a = new Complex32(2.0f, 5.0e-1f);
            b = new Complex32(2.0f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(2.0f, - 5.0e-1f);
            b = new Complex32(-2.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(4.0f, -1.0f), 1e-7f);
            a = new Complex32(-2.0f, 5.0e-1f);
            b = new Complex32(-2.0f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(-2.0f, - 5.0e-1f);
            b = new Complex32(2.0f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-4.0f, -1.5f), 1e-7f);
            a = new Complex32(2.0f, 1.0f);
            b = new Complex32(2.0f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(2.0f, -1.0f);
            b = new Complex32(-2.0f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(4.0f, -2.0f), 1e-7f);
            a = new Complex32(-2.0f, 1.0f);
            b = new Complex32(-2.0f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(-2.0f, -1.0f);
            b = new Complex32(2.0f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-4.0f, -3.0f), 1e-7f);
            a = new Complex32(2.0f, 2.0f);
            b = new Complex32(2.0f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(2.0f, -2.0f);
            b = new Complex32(-2.0f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(4.0f, -4.0f), 1e-7f);
            a = new Complex32(-2.0f, 2.0f);
            b = new Complex32(-2.0f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(-2.0f, -2.0f);
            b = new Complex32(2.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(-4.0f, -8.38861e6f), 1e-7f);
            a = new Complex32(2.0f, 8.388608e6f);
            b = new Complex32(2.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(2.0f, -8.388608e6f);
            b = new Complex32(-2.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(4.0f, -1.6777216e7f), 1e-7f);
            a = new Complex32(-2.0f, 8.388608e6f);
            b = new Complex32(-2.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(-2.0f, -8.388608e6f);
            b = new Complex32(8.388608e6f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-8.38861e6f, -8.388608e6f), 1e-7f);
            a = new Complex32(8.388608e6f, 0.0f);
            b = new Complex32(-8.388608e6f, 0.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.6777216e7f, 0.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, 0.0f);
            b = new Complex32(8.388608e6f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.6777216e7f, -1.19209289550780998537e-7f), 1e-7f);
            a = new Complex32(8.388608e6f, 1.19209289550780998537e-7f);
            b = new Complex32(8.388608e6f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(8.388608e6f, -1.19209289550780998537e-7f);
            b = new Complex32(-8.388608e6f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.6777216e7f, -2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-8.388608e6f, 1.19209289550780998537e-7f);
            b = new Complex32(-8.388608e6f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-8.388608e6f, -1.19209289550780998537e-7f);
            b = new Complex32(8.388608e6f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.6777216e7f, -5.00000119209289550781e-1f), 1e-7f);
            a = new Complex32(8.388608e6f, 5.0e-1f);
            b = new Complex32(8.388608e6f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(8.388608e6f, - 5.0e-1f);
            b = new Complex32(-8.388608e6f, 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.6777216e7f, -1.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, 5.0e-1f);
            b = new Complex32(-8.388608e6f, - 5.0e-1f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, - 5.0e-1f);
            b = new Complex32(8.388608e6f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.6777216e7f, -1.5f), 1e-7f);
            a = new Complex32(8.388608e6f, 1.0f);
            b = new Complex32(8.388608e6f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(8.388608e6f, -1.0f);
            b = new Complex32(-8.388608e6f, 1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.6777216e7f, -2.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, 1.0f);
            b = new Complex32(-8.388608e6f, -1.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, -1.0f);
            b = new Complex32(8.388608e6f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.6777216e7f, -3.0f), 1e-7f);
            a = new Complex32(8.388608e6f, 2.0f);
            b = new Complex32(8.388608e6f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(8.388608e6f, -2.0f);
            b = new Complex32(-8.388608e6f, 2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.6777216e7f, -4.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, 2.0f);
            b = new Complex32(-8.388608e6f, -2.0f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 4.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, -2.0f);
            b = new Complex32(8.388608e6f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(-1.6777216e7f, -8.38861e6f), 1e-7f);
            a = new Complex32(8.388608e6f, 8.388608e6f);
            b = new Complex32(8.388608e6f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(8.388608e6f, -8.388608e6f);
            b = new Complex32(-8.388608e6f, 8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(1.6777216e7f, -1.6777216e7f), 1e-7f);
            a = new Complex32(-8.388608e6f, 8.388608e6f);
            b = new Complex32(-8.388608e6f, -8.388608e6f);
            TestHelper.TestRelativeError(a - b, new Complex32(0.0f, 1.6777216e7f), 1e-7f);
            a = new Complex32(-8.388608e6f, -8.388608e6f);
            b = new Complex32(0.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a - b, new Complex32(-8.388608e6f, -8.38860800000011920929e6f), 1e-7f);
        }
    }
}